|
|
EEG - Electrode Placement |
| Tags | record☁eeg☁electrode placement☁snr |
The acquisition of
Electroencephalogram (EEG)
data requires the correct electrode placement for good signal quality. For conventional EEG data acquisitions, electrodes are placed according to the
10-20 system
to measure the electric potentials from the skin.
The potential differences are measured between each electrode and a reference electrode whereas in
bipolar recording
such as the one existent on PLUX"s sensors, the potential difference is measured between adjacent electrodes.
Hence when using a single PLUX EEG sensor with two electrodes, one needs to decide on one specific electrode position of the 10-20 system relating to the desired brain region for data acquisition.
This Jupyter Notebook illustrates the electrode placement for acquiring EEG signals when the researcher wants to extract the alpha band frequencies for the task of closing the eyes and compares the signal quality by measuring the Signal-to-noise ratio (SNR) .
For more information on alpha band extraction as well as SNR please refer to the notebooks:
EEG - Alpha band extraction
and
EEG - Digital filtering
.
1 - Importation of the needed packages
# Biosignalsnotebooks python package
import biosignalsnotebooks as bsnb
# Scientific packages
from numpy import logical_and, trapz
from scipy.signal import welch
2 - Electrode Placement
2.1 - Preparation
Consider the following steps before placing the electrodes at the desired region:
2.2 - Alpha Band Frequency location
For measuring the alpha band frequencies (8-12 Hz), the electrodes are placed on the
occipital (O)
/
parietal (P)
positions due to formation of alpha oscillations in the occipital lobe.
The neutral electrode is placed behind the
ear (M1)
position.
For more information on alpha waves, please refer to the notebook
EEG - Alpha band extraction
.
2.3 - Setup
The following setup of
electrode placements
were tested in order to compare the
signal quality
for measurement of alpha band power.
List of electrode placements used for alpha power detection:
|
|
|
| 1.A | 1.B | 1.B |
|
|
|
| 2.A | ||
|
|
|
| 2.B |
3 - Loading of acquired EEG data and Unit Conversion
For a detailed explanation on how to load the acquired EEG data as well as performing the Unit Conversion of the raw data, please refer to the notebooks
Load acquired data from .txt file
and
EEG-Unit Conversion
A - Electrode Position O1/O2
# Load Data from signal samples library - electrode position O1/O2:
data, header = bsnb.load_signal("eeg_sample_o", get_header=True)
# [The acquired EEG data is at channel 1 ("CH1")]
eeg_data = data["CH1"]
B - P3/P4 Segment
#Load Data from signal samples library
#A: P3/P4 Segment:
data_eeg_p = bsnb.load_signal("eeg_sample_p")
# [The acquired EEG data is at channel 1 ("CH1")]
#A: P3/P4 Segment:
eeg_data_p = data_eeg_p["CH1"]
C - O1/O2 Horizontal Segment
#B:O1/O2 horizontal Segment:
data_eeg_0cm_hor = bsnb.load_signal("eeg_sample_0cm_h")
data_eeg_1cm_hor = bsnb.load_signal("eeg_sample_1cm_h")
data_eeg_2cm_hor = bsnb.load_signal("eeg_sample_2cm_h")
# [The acquired EEG data is at channel 1 ("CH1")]
#B:O1/O2 horizontal Segment:
eeg_data_0cm_hor = data_eeg_0cm_hor["CH1"]
eeg_data_1cm_hor = data_eeg_1cm_hor["CH1"]
eeg_data_2cm_hor = data_eeg_2cm_hor["CH1"]
D - O1/O2 Vertical Segment
#C:O1 vertical Segment:
data_eeg_0cm_ver = bsnb.load_signal("eeg_sample_0cm_v")
data_eeg_1cm_ver = bsnb.load_signal("eeg_sample_1cm_v")
data_eeg_2cm_ver = bsnb.load_signal("eeg_sample_2cm_v")
# [The acquired EEG data is at channel 1 ("CH2")]
#C:O1 vertical Segment:
eeg_data_0cm_ver = data_eeg_0cm_ver["CH2"]
eeg_data_1cm_ver = data_eeg_1cm_ver["CH2"]
eeg_data_2cm_ver = data_eeg_2cm_ver["CH2"]
3.1 - Store acquisition constants
Two extremely relevant parameters defined before data acquisition are the sampling rate and ADC resolution. On one of the previous cells (substep
A
) we only request the
header
of
eeg_sample_o
signal sample because the remaining signal samples were collected in similar conditions (at the same sampling rate and resolution).
sr = header["sampling rate"] # Sampling Rate
resolution = header["resolution"][0]
3.2 - Conversion of ADC sample values to physical units (uV) and generation of a time-axis
The device used to acquire EEG data belongs to the "biosignalsplux" model.
In order to convert the raw EEG signal to its physical units, the recorded data must be passed as an input of
raw_to_phy
function.
A - Electrode Position O1/O2
#Unit Conversion #electrode position O1/O2:
eeg_signal_uv = bsnb.raw_to_phy("EEG", "biosignalsplux", eeg_data, resolution, "uV")
time_eeg_signal_uv = bsnb.generate_time(eeg_signal_uv, sr)
B - P3/P4 Segment
#Unit Conversion
#A: P3/P4 Segment:
eeg_signal_uv_p = bsnb.raw_to_phy("EEG", "biosignalsplux", eeg_data_p, resolution, "uV")
time_eeg_signal_uv_p = bsnb.generate_time(eeg_signal_uv_p, sr)
C - O1/O2 Horizontal Segment
#B:O1/O2 horizontal Segment:
eeg_signal_uv_0cm_hor = bsnb.raw_to_phy("EEG", "biosignalsplux", eeg_data_0cm_hor, resolution, "uV")
time_eeg_signal_uv_0cm_hor = bsnb.generate_time(eeg_signal_uv_0cm_hor, sr)
eeg_signal_uv_1cm_hor = bsnb.raw_to_phy("EEG", "biosignalsplux", eeg_data_1cm_hor, resolution, "uV")
time_eeg_signal_uv_1cm_hor = bsnb.generate_time(eeg_signal_uv_1cm_hor, sr)
eeg_signal_uv_2cm_hor = bsnb.raw_to_phy("EEG", "biosignalsplux", eeg_data_2cm_hor, resolution, "uV")
time_eeg_signal_uv_2cm_hor = bsnb.generate_time(eeg_signal_uv_2cm_hor, sr)
D - O1/O2 Vertical Segment
#C:O1 vertical Segment:
eeg_signal_uv_0cm_ver = bsnb.raw_to_phy("EEG", "biosignalsplux", eeg_data_0cm_ver, resolution, "uV")
time_eeg_signal_uv_0cm_ver = bsnb.generate_time(eeg_signal_uv_0cm_ver, sr)
eeg_signal_uv_1cm_ver = bsnb.raw_to_phy("EEG", "biosignalsplux", eeg_data_1cm_ver, resolution, "uV")
time_eeg_signal_uv_1cm_ver = bsnb.generate_time(eeg_signal_uv_1cm_ver, sr)
eeg_signal_uv_2cm_ver = bsnb.raw_to_phy("EEG", "biosignalsplux", eeg_data_2cm_ver, resolution, "uV")
time_eeg_signal_uv_2cm_ver = bsnb.generate_time(eeg_signal_uv_2cm_ver, sr)
4 - Signal Quality Check - Effect of Electrode placement
4.1 - Raw Data
The figure shows the raw eeg data of electrode positions: O1/O2 and P3/P4:
The following plot illustrates the raw eeg data of O1 vertical and O1/O2 horizontal electrode placement with each 0 / 1 / 2 cm distance: